int intLen(int n)
{
    return (n<10)?1:intLen(n/10)+1;
}

int main()
{
    printf("%d\n",1==intLen(0));
    printf("%d\n",1==intLen(1));
    printf("%d\n",3==intLen(123));
    return 0;
}
